import { Image, Text, View } from "@tarojs/components";

import './index.scss';

export interface IMenuItemProps {
  icon: string;
  title: string;
  onClick: () => void;
}

const MenuItem = ({ icon, title, onClick }: IMenuItemProps) => {
  return (
    <View className='configItem' onClick={onClick}>
      <Image src={icon} className='configItemIcon' />
      <Text className='configItemName'>{title}</Text>
    </View>
  );
};

export default MenuItem;
